import React, { Component } from 'react';
import './App.css';
import 'core-js';
import {config} from "./config";


import {Route,BrowserRouter as Router,Switch} from 'react-router-dom';
import Index from './views/Index';
import OrderTaking from './views/orderTaking';
import Distribution from './views/distribution';
import OrderDetails from './views/orderDetails';
import StorageManage from './views/storageManage';
import CheckOrder from './views/checkOrder';
import CheckOrderDetail from './views/checkOrderDetail';
import StorageDetail from './views/storageDetail';

class App extends Component {
  render() {
    return (
      <Router>
          <Switch>
              <Route path={config.path+"/index"} component={Index} />
              <Route path={config.path+"/orderTaking"} expected component={OrderTaking} />
              <Route path={config.path+"/distribution"} expected component={Distribution} />
              <Route path={config.path+"/orderDetails/:id"} expected component={OrderDetails} />
              <Route path={config.path+"/storageManage"} expected component={StorageManage} />
              <Route path={config.path+"/checkOrder"} expected component={CheckOrder} />
              <Route path={config.path+"/checkOrderDetail/:id"} expected component={CheckOrderDetail} />
              <Route path={config.path+"/storageDetail/:id"} expected component={StorageDetail} />
              <Route component={Index} />
          </Switch>
      </Router>
    );
  }
}

export default App;
